import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import Vant from "vant";
import "vant/lib/index.css";
import { setRem } from "./utils/rem";

setRem();

// onresize 回调数组
window.resizeCallbackList = [setRem];
window.onresize = () => {
  window.resizeCallbackList.map((callback) => {
    callback();
  });
};
Vue.config.productionTip = false;
Vue.use(Vant);
new Vue({
  router,
  store,
  render: (h) => h(App),
  beforeCreate() {
    Vue.prototype.$bus = this;
  },
}).$mount("#app");
